class CreateArticles < ActiveRecord::Migration[6.1]
  def change
    create_table :articles do |t|
      t.string :thumbnail_img
      t.string :title
      t.string :content
      t.string :tags
      t.integer :article_category_id
      t.integer :admin_user_id
      t.integer :company_id

      t.timestamps
    end
    add_index :articles, :article_category_id
    add_index :articles, :admin_user_id
    add_index :articles, :company_id
  end
end
